import tkinter as tk
from PIL import Image, ImageTk
import time


def update_image(root: tk.Tk, label: tk.Label):
    new_image = Image.open("update.png")
    photo = ImageTk.PhotoImage(new_image)
    label.config(image=photo)
    label.image = photo
    root.after(1000, update_image, root, label)


root = tk.Tk()
root.title("test")
init_img = Image.open("init.png")
photo = ImageTk.PhotoImage(init_img)
label = tk.Label(root, image=photo)
label.pack()
update_image(root, label)
root.mainloop()
